#include<stdio.h>
#define N 20
void Input(int a[][20], int n);
int FindMax(int a[][20], int n, int *prow, int *pcol);
int main()
{    	 	 		     
    int a[N][N], n;
    int maxnum, maxrow, maxcol;//1

    printf("Input n:\n");
    scanf("%d", &n);//1

    Input(a, n);//3
    maxnum = FindMax(a, n, &maxrow, &maxcol);//4

    printf("最大值是:%d,最大值行下标是:%d,列下标是:%d\n", maxnum, maxrow, maxcol);//2
    return 0;
}    	 	 		     
void Input(int a[][20], int n)
{    	 	 		     
    int i, j;

    printf("请按行读入方阵的值:\n");
    for (i = 0; i < n; i++)    //1
    {    	 	 		     
        for (j = 0; j < n; j++)//1
        {    	 	 		     
            scanf("%d", &a[i][j]);//1
        }
    }
}    	 	 		     
int FindMax(int a[][20], int n, int *prow, int *pcol)
{    	 	 		     
    int maxnum, i, j;

    maxnum = a[0][0];//1
    *prow = 0;//1
    *pcol = 0;//1

    for (i = 0; i < n; i++)//1
    {    	 	 		     
        for (j = 0; j < n; j++)//1
        {    	 	 		     
            if (a[i][j] > maxnum)//1
            {    	 	 		     
                maxnum = a[i][j];//1
                *prow = i;//1
                *pcol = j;//1
            }
        }
    }
    return maxnum;//2
}